
/**
 * 尊敬的用户，你好：页面 JS 面板是高阶用法，一般不建议普通用户使用，如需使用，请确定你具备研发背景，能够自我排查问题。
 * 我们可以用 JS 面板来开发一些定制度高功能，比如：调用API接口，自定义动作执行等等。
 */

// 当页面渲染完毕后马上调用下面的函数，这个函数是在当前页面 - 设置 - 生命周期 - 页面加载完成时中被关联的。
export function didMount() {
    ("「页面 JS」：当前页面地址 " + location.href);
    const slef = this;
    debugger
    let litigantName = slef.$$("detail_field_fdf1e7").$$getValue();

    let legal_person_name = self.$$m("detail_field_9l079m");
    let manager_name = self.$$m("detail_field_d1730l");

    let legal_person_manager_name= self.$$("cell_fcw734");
    let address = self.$$("cell_2kmzxs");

    let region_name = self.$$("cell_3amqi1");
    let region_name1 = self.$$("cell_17kx71");
    let register_address = self.$$("cell_f85isy");
    let register_region_name = self.$$("cell_80ug9o");
    let register_region_name1 = self.$$("cell_7tnap8");
    let manage_address = self.$$("cell_bls636");
    let manage_region_name = self.$$("cell_3sxtkg");
    let manage_region_name1 = self.$$("cell_7gk0ot");

    if(litigantName === '公民'){
        legal_person_manager_name.$el.style.display = 'none';

        address.$el.style.display = '';
        region_name.$el.style.display = '';
        region_name1.$el.style.display = '';

        register_address.$el.style.display = 'none';
        register_region_name.$el.style.display = 'none';
        register_region_name1.$el.style.display = 'none';

        manage_address.$el.style.display = 'none';
        manage_region_name.$el.style.display = 'none';
        manage_region_name1.$el.style.display = 'none';
    }else if(litigantName === "法人或其他组织"){
        legal_person_name.props.behavior.value = 'NORMAL';
        manager_name.props.behavior.value = 'HIDDEN';

        region_name.$el.style.display = '';
        region_name1.$el.style.display = '';

        register_address.$el.style.display = 'none';
        register_region_name.$el.style.display = 'none';
        register_region_name1.$el.style.display = 'none';

        manage_address.$el.style.display = 'none';
        manage_region_name.$el.style.display = 'none';
        manage_region_name1.$el.style.display = 'none';
    }else{

    }



}
